package dao.jpa;

import java.util.List;

import vo.UserGroup;
import dao.UserGroupDAO;

public class UserGroupDAOJpaImpl extends GenericDaoJpaImpl<UserGroup, Long> implements UserGroupDAO {

	public UserGroupDAOJpaImpl() {
		super(UserGroup.class);
	}

	public List<UserGroup> findAll() {
		return super.executeFinder("UserGroup.findAll");
	}

	public UserGroup findByName(String name) {
		return super.executeSingleFinder("UserGroup.findByName",name);
	}
	public UserGroup getById(long id) {
		return super.read(id);
	}

	public void update(long id) {
		UserGroup g = super.read(id);
		super.update(g);
	}

	public void delete(long id)// 真正删除
	{
		UserGroup g = super.read(id);
		super.delete(g);
	}

}
